# $Id: PKGBUILD 61033 2011-12-20 20:09:58Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=arm-wince-cegcc-cegccthrddll
pkgver=0.59.1
pkgrel=1
_prefix=/opt/cegcc
pkgdesc="CE GCC bundle - cross compilation tools for WinCE"
arch=('any')
license=(GPL)
url="http://cegcc.sf.net"
depends=('arm-wince-cegcc-cegccdll')
makedepends=('arm-wince-cegcc-gcc' 'arm-wince-cegcc-newlib' 'arm-wince-cegcc-importlibs'
	     'arm-wince-cegcc-w32api')
groups=('cegcc')
options=(!libtool !strip)
source=(http://arch.p5n.pp.ru/~sergej/dl/cegcc-$pkgver.tar.bz2)
md5sums=('5e3c1098abdf8e5db2a3518ee3578b4b')

build() {
  cd $srcdir/cegcc/src/cegcc/cegccthrd

  export PATH=$_prefix/bin:$PATH
  export TARGET=arm-wince-cegcc
  unset CFLAGS
  unset CXXFLAGS
  unset LDFLAGS
  unset MAKEFLAGS

  make
  make PREFIX=$pkgdir/$_prefix install
  find $pkgdir/${_prefix} -type f -name \*.a -exec arm-wince-cegcc-ranlib {} \;
}
